package com.quarttz.job;

import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Author 咕唧
 * @Date 2022/5/26 10:01
 * @Version 1.0
 */
@EnableScheduling//开启定时任务
@Component//必须添加
public class SpringJob {

    @Scheduled(cron = "0/5 * * * * ?")
    public void renwu() {
        System.out.println("spring的定时任务执行了" + System.currentTimeMillis());
    }
}
